package controller;

import java.util.HashMap;

public class CommandManager {
	HashMap<String, Command> hm = null;
	protected static CommandManager cmgr = null; 
	protected CommandManager(){
		hm=new HashMap<String,Command>();
		
		hm.put("Find", new FindCommand());
		hm.put("Share", new ShareCommand());
	}
	
	static public CommandManager getInstance(){
		
		if(cmgr == null){
			cmgr = new CommandManager();
		}
		
		return cmgr;
	}
	
	public Command getCommand(String s)
	{
		return hm.get(s);
	}
		
}
